package com.prg.model.base;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TmenuId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TmenuId implements java.io.Serializable {

	// Fields

	private String id;
	private String pid;
	private String label;
	private String icon;
	private String url;

	// Constructors

	/** default constructor */
	public TmenuId() {
	}

	/** full constructor */
	public TmenuId(String id, String pid, String label, String icon, String url) {
		this.id = id;
		this.pid = pid;
		this.label = label;
		this.icon = icon;
		this.url = url;
	}

	// Property accessors

	@Column(name = "ID", length = 100)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "PID", length = 100)
	public String getPid() {
		return this.pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	@Column(name = "LABEL", length = 100)
	public String getLabel() {
		return this.label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	@Column(name = "ICON", length = 100)
	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Column(name = "URL", length = 200)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmenuId))
			return false;
		TmenuId castOther = (TmenuId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getPid() == castOther.getPid()) || (this.getPid() != null
						&& castOther.getPid() != null && this.getPid().equals(
						castOther.getPid())))
				&& ((this.getLabel() == castOther.getLabel()) || (this
						.getLabel() != null && castOther.getLabel() != null && this
						.getLabel().equals(castOther.getLabel())))
				&& ((this.getIcon() == castOther.getIcon()) || (this.getIcon() != null
						&& castOther.getIcon() != null && this.getIcon()
						.equals(castOther.getIcon())))
				&& ((this.getUrl() == castOther.getUrl()) || (this.getUrl() != null
						&& castOther.getUrl() != null && this.getUrl().equals(
						castOther.getUrl())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getPid() == null ? 0 : this.getPid().hashCode());
		result = 37 * result
				+ (getLabel() == null ? 0 : this.getLabel().hashCode());
		result = 37 * result
				+ (getIcon() == null ? 0 : this.getIcon().hashCode());
		result = 37 * result
				+ (getUrl() == null ? 0 : this.getUrl().hashCode());
		return result;
	}

}